Arrays in TEX

In the configuration file the following parameters can be assigned:


12345 memmax memtop memmax resp. memtop indicate the size of the most important arrays in TEXİn this ``main memory'' e.g. the complete page is built and macro definitions are stored.

initex ignores the value of memmax and sets $\tt memmax$ = $\tt memtop$. The value of memtop should be chosen as large as possible when dumping with initex, this is stored in the format file as well.

For virtex and initex must apply: $\tt memtop$$\tt memmax$≤65534. Thus you can use a bigger ``main memory'' for virtex than for initex.

Memory usage: 4 Bytes * memmax resp. memtop

triesize itriesize trieopsize All separation tables, that are read by initex, are stored very compact in a ``Trie''. initex, however, needs a lot of memory for this Trie, as it has to be completely built first, before it can be compressed[*]. Because of the very large memory requirement of the Trie in initex, membot must be set to a value < 65534 in case of little memory. As the compressed Trie for virtex needs much less space, memmax can be usually set to 65534, so that you have the largest possible `main memory' available for formatting. The size of the Trie is indicated by triesize (for virtex) resp. itriesize (for initex). Both must be smaller than 65536. The number of ``trie operands'' is trieopsize ( ≤32767).

Memory usage:     #&    # Bytes&    # Bytes &    (i)triesize&    trieopsize initex& 15& 10 virtex& 05& 03

fontmax fontmemsize fontmax gives the maximum number of fonts loaded (must be ≤255). The font information from the tfm files is loaded into an array of size fontmemsize. Where fontmemsize can be any size.

Memory usage: 79 Bytes * fontmax + 4 Bytes * fontmemsize

maxstrings poolsize stringvacancies In an array called ``String Pool'' all strings are stored, which also includes all TEXmacros and -primitives, like e.g. \relax. The size of this array is determined by poosize, the number of strings by maxstrings. stringvacancies indicates, how much space in the String Pool after loading of a format file must at least be present for user defined strings. All three parameters can be chosen to be of infinite size.

Memory usage: 1 Byte * poolsize + 4 Byte * maxstrings

bufssize maxinopen Every line entered (from a file or from the keyboard) is stored in an array of the size bufsize. bufsize must be smaller than 65536. maxinopen gives the number of simultaniously open files (must be smaller than 128).

Memory usage: 1 Byte * bufsize + 8 Byte * maxinopen

maxprintline errorline halferrorline maxprintline gives the maximum length of the log output to the screen resp. to the log file (usually = 79, must be ≥60). errorline gives the maximum length of the context information in case of an error (must be ≥45), halferrorline is the length of the first line of this context ( 30≤$\tt halferrorline$errorline - 15).

Memory usage: 1 Byte * errorline

savesize stacksize dvibufsize For saving values within groups (local assignments, ||) space of size savesize is used. stacksize gives the number of ``Input-Sources'' (file, macros, tokenlists, …). The buffer for writing of the |dvi| file is dvibufsize Bytes[*].

Memory usage: 2 Bytes * |savesize| + 10 Bytes * |stacksize| + 1 Byte * |dvibufsize|


What values should be assigned to the individual parameters? For that you simply seek the help of the log file, which has been created while dumping a format file[*].

When dumping TEX (German |plain.fmt|) you get the following log file:

This is a PD-Version of Pas-TeX (made Jan 26 1991 [br]/[hes]) This is TeX, C Version 3.1 (INITEX) 28 JAN 1991 02:51 **plain =amiga =/doc/nice (plain.tex Preloading the plain format: codes, registers, ... [lines deleted] ... Beginning to dump on file plain.fmt (format=plain 91.1.28) 2121 strings of total length 28932 7874 memory locations dumped; current usage is 118&7748 1063 multiletter control sequences ... [lines deleted] ... 16011 words of font info for 54 preloaded fonts 0 hyphenation exceptions Hyphenation trie of length 9980&11780 has 281 ops out of 500 281 for language 0 No pages of output.;'';''

From this you recognize the lower bounds for some important parameters: |maxstrings| > 2121, |poolsize| > 28932, |memmax| > 7874, |fontmax| > 54, |fontmemsize| > 16011. The actual values used should be chosen larger: |memmax| should, when possible, be set to 65534, the other parameters to at least 10% larger values.

The Trie with the separation tables can, after it has been compressed, no longer become larger. Because of this you can set |triesize| to a value ≥9980 and |triopsize| to ≥281. (For dumping of this format, for |initex|, the parameter |trieopsize| must be set > 11780.)

All other parameters should be left unchanged and only after the error message TeX capacity exceeded occurs should you enlarge the particular parameter.



Subsections